/**
 * 格式化日期 yyyy-MM-dd HH:mm:ss
 * @returns 
 */
export function getDate() {
  const date = new Date();
  const year = date.getFullYear();
  const month = date.getMonth() + 1 < 10 ? "0" + date.getMonth() + 1 : date.getMonth() + 1;
  const day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
  const hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
  const min = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  const sec = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
  return year + "-" + month + "-" + day + " " + hour + ":" + min + ":" + sec;
}
